﻿namespace Autorent.Desktop.Modules.Addresses
{
    using Microsoft.Practices.Prism.Modularity;
    using Microsoft.Practices.Prism.Regions;
    using Microsoft.Practices.Unity;
    using Autorent.Desktop.Modules.Addresses.Services;

    /// <summary>
    /// The module contains work with addresses. Create and Update.
    /// </summary>
    public class AddressesModule : IModule
    {
        private readonly IUnityContainer _container;
        private readonly IRegionManager _regionManager;

        public AddressesModule(IUnityContainer container, IRegionManager regionManager)
        {
            this._container = container;
            this._regionManager = regionManager;
        }

        public void Initialize()
        {
            this._container.RegisterType(typeof(ICountriesRepository), typeof(CountriesRepository));
            this._container.RegisterType(typeof(IRegionsRepository), typeof(RegionsRepository));
            this._container.RegisterType(typeof(ICitiesRepository), typeof(CitiesRepository));
            this._container.RegisterType(typeof(IStreetsRepository), typeof(StreetsRepository));
        }
    }
}
